package com.eorchis.module.trainingneeds.dao;

import java.util.List;
import java.util.Map;

import com.eorchis.core.basedao.dao.IDaoSupport;
import com.eorchis.module.trainingneeds.domain.QueryQuestionBankBean;
import com.eorchis.module.trainingneeds.domain.QueryQuestionnaireBean;
import com.eorchis.module.trainingneeds.domain.QuerySurveyObjectBean;
import com.eorchis.module.trainingneeds.ui.commond.QuestionBankQueryCommond;
import com.eorchis.module.trainingneeds.ui.commond.QuestionBankValidCommond;
import com.eorchis.module.trainingneeds.ui.commond.QuestionnaireQueryCommond;
import com.eorchis.module.trainingneeds.ui.commond.QuestionnaireSurveyObjectQueryCommond;
import com.eorchis.module.trainingneeds.ui.commond.QuestionnaireSurveyObjectValidCommond;
import com.eorchis.module.trainingneeds.ui.commond.QuestionnaireValidCommond;

/**
 * Title: IQuestionnaireDao<br>
 * Description: 培训需求问卷表数据接口<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author HuangTF
 * @createDate 2014-02-07
 * @version $Revision$
 */
public interface IQuestionnaireDao extends IDaoSupport
{
	/**
	 * 判断培训需求调查问卷名称是否重复
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-7
	 */
	public boolean isRepeatName(String questionnaireName) throws Exception;
	/**
	 * 发布撤销培训需求调查问卷
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-7
	 */
	public int publishQuestionnaire(QuestionnaireQueryCommond queryCommond) throws Exception;
	/**
	 * 判断是否可以发布培训需求调查问卷
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-7
	 */
	public boolean isPublish(QuestionnaireQueryCommond queryCommond) throws Exception;
//	/**
//	 * 删除培训需求调查问卷
//	 * @param queryCommond
//	 * @return
//	 * @throws Exception
//	 * @author HuangTF
//	 * @createDate 2014-2-7
//	 */
//	public void delAll(QuestionnaireQueryCommond queryCommond) throws Exception;
	/**
	 * 删除培训需求调查问卷时，删除关联表数据
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-7
	 */
	public void delAll(QuestionnaireQueryCommond queryCommond) throws Exception;
//	/**
//	 * 更新问卷调查对象类型
//	 * @param queryCommond
//	 * @return
//	 * @throws Exception
//	 * @author HuangTF
//	 * @createDate 2014-5-27
//	 */
//	public void updateSurveyObjectType(QuestionnaireSurveyObjectQueryCommond queryCommond) throws Exception;
	/**
	 * 更新问卷表调查对象类型
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-5-27
	 */
	public void updateSurveyObjectTypeQuestionnaire(QuestionnaireSurveyObjectQueryCommond queryCommond) throws Exception;
	/**
	 * 删除问卷调查对象类型信息
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-5-27
	 */
	public void delSurveyObjectType(QuestionnaireSurveyObjectQueryCommond queryCommond) throws Exception;
	/**
	 * 查询已选调查对象(指定人员)
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-5-27
	 */
	public List<QuerySurveyObjectBean> querySurveyObjectSelected(QuestionnaireSurveyObjectQueryCommond queryCommond) throws Exception;
	/**
	 * 查询未选调查对象(指定人员)
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-5-27
	 */
	public List<QuerySurveyObjectBean> querySurveyObjectNoSelected(QuestionnaireSurveyObjectQueryCommond queryCommond) throws Exception;
	/**
	 * 查询题库试题列表
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-17
	 */
	public List<QueryQuestionBankBean> queryQuestionBank(QuestionBankQueryCommond queryCommond) throws Exception;
	/**
	 * 查询试题信息
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-17
	 */
	public QueryQuestionBankBean queryQuestionInfo(QuestionBankValidCommond commond) throws Exception;
	/**
	 * 更新题库试题
	 * @param commond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-17
	 */
	public void updateQuestionBank(QuestionBankValidCommond commond) throws Exception;
	/**
	 * 更新试题启用作废状态
	 * @param commond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-17
	 */
	public void updateQuestionActiveState(QuestionBankQueryCommond queryCommond) throws Exception;
	/**
	 * 删除试题选项
	 * @param commond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-17
	 */
	public void delQuestionOption(QuestionBankValidCommond commond) throws Exception;
	/**
	 * 查询已发布问卷的试题，用于前台判断题库试题是否可以删除
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-17
	 */
	public List<String> isCanDel(QuestionBankQueryCommond queryCommond) throws Exception;
	/**
	 * 查询全部题型
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-18
	 */
	public List<String> queryAllQuestionType() throws Exception;
	/**
	 * 查询问卷表已设置题型
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-18
	 */
	public List<String> queryQuestionType(QuestionBankQueryCommond queryCommond) throws Exception;
	/**
	 * 问卷设置试题时查询未选题库试题
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-18
	 */
	public List<QueryQuestionBankBean> queryQuestionNoSelected(QuestionBankQueryCommond queryCommond) throws Exception;
	/**
	 * 问卷设置试题时查询已选题库试题
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-18
	 */
	public List<QueryQuestionBankBean> queryQuestionSelected(QuestionBankQueryCommond queryCommond) throws Exception;
	/**
	 * 新增问卷试题时，查询已选问卷试题的最大排序序号
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-18
	 */
	public int queryQuestionnaireQuestionMaxOrder(QuestionBankQueryCommond queryCommond) throws Exception;
	/**
	 * 判断试题题干是否重复
	 * @param commond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-2-18
	 */
	public boolean isRepeatQuestionName(QuestionBankValidCommond commond) throws Exception;
	/**
	 * 问卷查看列表,查看已结束问卷调查情况
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-4-29
	 */
	public List<QueryQuestionnaireBean> findEndQuestionnaireList(QuestionnaireQueryCommond queryCommond) throws Exception;
	/**
	 * 查看参与问卷调查的人员详情
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-4-29
	 */
	public List<QuerySurveyObjectBean> findSurveyUserInfo(QuestionnaireSurveyObjectQueryCommond queryCommond) throws Exception;
	/**
	 * 查看已结束问卷试题调查情况
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-4-29
	 */
	public List<QueryQuestionBankBean> endQuestionnaireResult(QuestionBankQueryCommond queryCommond) throws Exception;
	/**
	 * 查询问卷试题
	 * @param commond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-5-28
	 */
	public List<QueryQuestionBankBean> queryQuestionnaireQuestion(QuestionnaireValidCommond commond) throws Exception;
	/**
	 * 删除问卷试题关联
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-5-28
	 */
	public void delQuestionnaireQuestion(QuestionBankQueryCommond queryCommond) throws Exception;
	/**
	 * 删除问卷试题后更新试题排序
	 * @param questionnaireQuestionIdList
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-09-12
	 */
	public void sortQuestionAfterDel(List<String> questionnaireQuestionIdList) throws Exception;
	/**
	 * 批量导入Excel试题到题库
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-11-11
	 */
	public boolean addBatchQuestion(List<QuestionBankValidCommond> commondList) throws Exception;
	/**
	 * 批量导入Excel试题选项到题库
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-11-11
	 */
	public boolean addBatchQuestionOptions(List<QuestionBankValidCommond> commondList) throws Exception;
	/**
	 * 批量查询题库重复试题
	 * @param queryCommond
	 * @return
	 * @throws Exception
	 * @author HuangTF
	 * @createDate 2014-11-11
	 */
	public Map<String, List<String>> queryRepeatNameQuestion(Map<String, List<String>> typeNameMap) throws Exception;
	
	/**
	 * @author RongSL
	 * @Date 2016-05-26
	 * 根据课程id找到相关班级id
	 * */
	public String findClassId(QuestionnaireSurveyObjectValidCommond commond) throws Exception;
}
